<template>
    <van-tabbar v-model="active">
     <van-tabbar-item to="/home" icon="home-o">首页</van-tabbar-item>
     <van-tabbar-item to="/course" icon="newspaper-o" >课程</van-tabbar-item>
     <van-tabbar-item to="/news" icon="smile-comment-o">问答</van-tabbar-item>
     <van-tabbar-item to="/center" icon="manager-o">我的</van-tabbar-item>
    
    </van-tabbar>
    </template>
    
    <script setup lang='ts'>
    import { ref } from 'vue';
    // 要根据路由状态动态的设置 active 值
    const active = ref<number>(0);
    </script>